package com.engine.cn.configuration;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {
    
    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("测试平台API")
                        .version("1.0")
                        .description("Spring Boot整合Apifox示例")
                        .contact(new Contact()
                                .name("开发团队")
                                .email("dev@example.com")))
                .externalDocs(new ExternalDocumentation()
                        .description("详细文档")
                        .url("http://localhost:8080/v3/api-docs"));
    }
}